Skip to content

Commit a43979b

Browse files
authored
fix(cloud-function): proxy blog assets for live samples incl. avif (#12994)
1 parent 43893d2 commit a43979b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cloud-function/src/app.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ router.get(
7878
);
7979
// Attachments.
8080
router.get(
81-
`/[^/]+/docs/*/*.(${ANY_ATTACHMENT_EXT.join("|")})`,
81+
[
82+
`/[^/]+/docs/*/*.(${ANY_ATTACHMENT_EXT.join("|")})`,
83+
`/[^/]+/blog/*/*.(${ANY_ATTACHMENT_EXT.join("|")})`,
84+
],
8285
requireOrigin(Origin.main, Origin.liveSamples, Origin.play),
8386
resolveIndexHTML,
8487
proxyContentAssets

libs/constants/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export const CSP_VALUE = cspToString(CSP_DIRECTIVES);
197197
// Always update client/src/setupProxy.js when adding/removing extensions, or it won't work on the dev server!
198198
export const AUDIO_EXT = ["mp3", "ogg"];
199199
export const FONT_EXT = ["woff2"];
200-
export const BINARY_IMAGE_EXT = ["gif", "jpeg", "jpg", "png", "webp"];
200+
export const BINARY_IMAGE_EXT = ["gif", "jpeg", "jpg", "png", "webp", "avif"];
201201
export const ANY_IMAGE_EXT = ["svg", ...BINARY_IMAGE_EXT];
202202
export const VIDEO_EXT = ["mp4", "webm"];
203203

0 commit comments

Comments
 (0)